<div class="row">
    <div class="colxl-12 col-lg-12 col-md-12 col-sm-12 col-12">
        <div class="page-title-wrapper">
            <div class="page-title-box">
                <h4 class="page-title bold">发送消息</h4>
            </div>
            <div class="breadcrumb-list">
                <ul>
                    <li class="breadcrumb-link">
                        <a href="../public/message.php?pagenow=<?=$_SESSION['messagePageNow']?>&searchvalue=<?=$_SESSION['messageSearchvalue']?>&check=<?=$_SESSION['checkCate']?>&filter=<?=$_SESSION['filter']?>">
                            <i class="far fa-envelope"></i> 消息中心
                        </a>
                    </li>
                    <li class="breadcrumb-link active"><i class="fas fa-file-signature"></i> 发送消息</li>
                </ul>
            </div>
        </div>
    </div>
</div>
<!-- Products view Start -->

<div class="row">
    <div class=" col-9" >
        <?=sendMessShowTips($_SESSION['sendMessShowTips'],$_SESSION['sendMesstipsType']); ?>
        <div class="card">
            <div class="card-header">
                <h4 class="card-title mb-0">编辑消息</h4>
            </div>
            <div class="card-body">
                <form id="saveorsend" action="./sendmess.php" method="post">
                    <input type="hidden" name="sendfromid" value="<?=$_SESSION['loginId'] ?>" >
                    <input type="hidden" name="mid" value="<?=$_POST['mid']?>" >
                    <div class="mb-3">
                        <label class="form-label font-weight-bold">接收人学号/工号</label>
                        <input class="form-control" placeholder="请输入接收人学号/工号(8位纯数字)" maxlength="8" name="gettoid" value="<?=$_GET['gettoid']?><?=$_POST['gettoid']?><?=$replyInfo[3]?>">
                    </div>
                    <div class="mb-3">
                        <label class="form-label font-weight-bold">消息主题</label>
                        <input class="form-control" placeholder="请输入消息主题(限50字)"  maxlength="50" name="messtitle" value="<?=$_POST['sendtitle']?><?=empty($replyInfo) ? '':('回复关于 【'.$replyInfo[1].'】')?><?=empty($forwardInfo) ? '':('转发关于 【'.$forwardInfo[1].'】 的内容')?>">
                    </div>
                    <div class="mb-3">
                        <label class="form-label font-weight-bold">消息内容</label>
                        <textarea class="form-control" rows="10" maxlength="800" placeholder="请输入消息内容(限800字)" spellcheck="false" name="messcontent"><?=$_POST['sendcontent']?><?=empty($forwardInfo) ? '':('原文内容：'.textsub($forwardInfo[2],mb_strlen($forwardInfo[2])))?></textarea>
                    </div>
                    <div class="form-footer row">
                        <div class="col-md-6 text-left">
                            <input type="submit" class="btn btn-warning squer-btn" name="action" value="存为草稿" >
                        </div>
                        <div class="col-md-6 text-right">
                            <input type="submit" class="btn btn-primary squer-btn" name="action" value="发 送" >
                            <input type="reset" class="btn btn-light squer-btn" value="重 置" >
                        </div>
                    </div>
                </form>
            </div>
        </div>
    </div>
    <div class="col-3" >
        <div>
            <div class="card">
                <div class="card-header">
                    <h4 class="card-title mb-0">最近联系</h4>
                </div>
                <div class="card-body d-flex justify-content-around flex-md-wrap">
                    <? foreach($LCUI as $val){ ?>
                    <div class="d-flex flex-column ml-3 mr-3 mb-3 text-center">
                        <a href="?gettoid=<?=$val[0]?>" class="user-info">
                            <? if(!empty($val[2])){ ?>
                            <img src="../../uploads/userpic/<?=$val[2] ?>" alt="" class="user-img" ;">
                            <?}else{ ?>
                            <img alt="" class="user-img" style="background-color:<?=random_color() ?> ;">
                            <?} ?>
                        </a>
                        <span><?=$val[1]?></span>
                    </div>
                    <? } ?>
                    <?=count($LCUI)==0 ? '最近暂无联系其他人':''?>
                </div>
            </div>
        </div>
    </div>
</div>